package com.petshop.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName pets
 */
@TableName(value = "pets")
@Data
public class Pets implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId("pet_id")
    private Integer petId;
    private Integer userId;
    private String name;
    private String species;
    private String breed;
    private Integer age;
    private String gender;
    private String petImage;
    private Date createdAt;
    private Date updatedAt;
    @TableLogic //逻辑删除字段
    private Integer deleted;
    @Version //乐观锁字段，每次更新数据后，拦截器都会让version+1
    private Integer version;
}